package com.woniu.carrent.pojo;

import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

/**
* 
* @TableName t_news
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_news")
public class TNews implements Serializable {

    /**
    * 
    */
    @TableId(value = "newsId", type = IdType.AUTO)
    @NotNull(message="[]不能为空")
    @ApiModelProperty("")
    private Integer newsid;
    /**
    * 
    */
    @NotBlank(message="[]不能为空")
    @Size(max= 255,message="编码长度不能超过255")
    @ApiModelProperty("")
    @Length(max= 255,message="编码长度不能超过255")
    @TableField(value = "title")
    private String title;
    /**
    * 
    */
    @Size(max= 8000,message="编码长度不能超过8000")
    @ApiModelProperty("")
    @Length(max= 8000,message="编码长度不能超过8,000")
    @TableField(value = "content")
    private String content;
    /**
    * 
    */
    @ApiModelProperty("")
    @TableField(value = "creatTime")
    @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern= "yyyy-MM-dd HH:mm:ss")
    private Date creattime;
    /**
    * 
    */
    @NotNull(message="[]不能为空")
    @ApiModelProperty("")
    @TableField(value = "userId")
    private Integer userid;
    @TableField(exist = false)
    private String username;

}
